home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue.arc / TVSTREAM.H < prev    next >
Text File  |  1990-01-09  |  8KB  |  182 lines

  1. /*=================================================*/
  2. /* TVSTREAM.H                                      */
  3. /*   prototypes and definitions for streams        */
  4. /*                                                 */
  5. /* (c) Copyright 1988 Ralf Brown                   */
  6. /*=================================================*/
  7.  
  8. /*==========================================*/
  9. /* stream headers, place at beginning of a  */
  10. /* stream                                   */
  11. /*==========================================*/
  12.  
  13. #define S_WINDOW(size)  0x1B, 0x00, size&0xFF, size>>8
  14. #define S_QUERY(size)   0x1B, 0x01, size&0xFF, size>>8
  15. #define S_MANAGER(size) 0x1B, 0x10, size&0xFF, size>>8
  16.  
  17. /*==========================================*/
  18.  
  19. #define WS_SETCURSROW(row)    0xA0,row
  20. #define WS_SETCURSCOL(col)    0xA1,col
  21. #define WS_SCRLROW(row)       0xA2,row
  22. #define WS_SCRLCOL(col)       0xA3,col
  23. #define WS_WINROW(row)        0xA4,row
  24. #define WS_WINCOL(col)        0xA5,col
  25. #define WS_WINROWS(rows)      0xA6,rows
  26. #define WS_WINCOLS(cols)      0xA7,cols
  27. #define WS_VIEWPORTROW(row)   0xA8,row
  28. #define WS_VIEWPORTCOL(col)   0xA9,col
  29. #define WS_LSIZEROWS(rows)    0xAA,rows
  30. #define WS_LSIZECOLS(cols)    0xAB,cols
  31. #define WS_CURSDOWN(rows)     0xB0,rows
  32. #define WS_CURSRIGHT(cols)    0xB1,cols
  33. #define WS_SCRLORIGDOWN(rows) 0xB2,rows
  34. #define WS_SCRLORIGRIGHT(rows) 0xB3,cols
  35. #define WS_SHFTWINROW(rows)   0xB4,rows
  36. #define WS_SHFTWINCOL(cols)   0xB5,cols
  37. #define WS_EXPWINROWS(rows)   0xB6,rows
  38. #define WS_EXPWINCOLS(cols)   0xB7,cols
  39. #define WS_SHFTVIEWROW(rows)  0xB8,rows
  40. #define WS_SHFTVIEWCOL(cols)  0xB9,cols
  41. #define WS_RELSIZEROWS(rows)  0xBA,rows
  42. #define WS_RELSIZECOLS(cols)  0xBB,cols
  43. #define WS_CURSPOS(row,col)   0xC0,row,col
  44. #define WS_SCRLORIG(row,col)  0xC1,row,col
  45. #define WS_WINPOS(row,col)    0xC2,row,col
  46. #define WS_WINSIZE(rows,cols) 0xC3,rows,cols
  47. #define WS_VIEWPORT(row,col)  0xC4,row,col
  48. #define WS_LSIZE(rows,cols)   0xC5,rows,cols
  49. #define WS_RELCURS(rows,cols) 0xC8,rows,cols
  50. #define WS_RELSCRL(rows,cols) 0xC9,rows,cols
  51. #define WS_RELWINPOS(rows,cols) 0xCA,rows,cols
  52. #define WS_RELWINSIZ(rows,cols) 0xCB,rows,cols
  53. #define WS_RELVIEWP(rows,cols) 0xCC,rows,cols
  54. #define WS_RELLSIZE(rows,cols) 0xCD,rows,cols
  55. #define WS_UPDATE             0xD4,0xE4
  56. #define WS_UNHIDDEN           0xD4
  57. #define WS_HIDDEN             0xD5
  58. #define WS_FRAME              0xD6
  59. #define WS_NOFRAME            0xD7
  60. #define WS_READCHAR           0xD8
  61. #define WS_READATTR           0xD9
  62. #define WS_LOGATTR            0xDA
  63. #define WS_PHYSATTR           0xDB
  64. #define WS_CTRLCHAR           0xDC
  65. #define WS_NOCTRLCHAR         0xDD
  66. #define WS_WRITEATTR          0xDE
  67. #define WS_LEAVEATTR          0xDF
  68. #define WS_REPEAT(count)      0xE0,count
  69. #define WS_DOREPEAT           0xE1
  70. #define WS_SETCOLOR(color)    0xE2,color
  71. #define WS_CLEAR              0xE3
  72. #define WS_REDRAW             0xE4
  73. #define WS_NEWWIN(rows,cols)  0xE6,rows,cols
  74. #define WS_SCRL_UP(h,w)       0xE8,h,w
  75. #define WS_SCRL_DOWN(h,w)     0xE9,h,w
  76. #define WS_SCRL_LEFT(h,w)     0xEA,h,w
  77. #define WS_SCRL_RIGHT(h,w)    0xEB,h,w
  78. /* each of the next three opcodes must be followed by the proper number of */
  79. /* data bytes */
  80. #define WS_ATTRIB(flags,f,start,num) 0xEC,flags,(f<<7)|((start&7)<<4)|(num&15)
  81. #define WS_FRATTR(flags,f,start,num) 0xED,flags,(f<<7)|((start&7)<<4)|(num&15)
  82. #define WS_FRCHAR(flags,f,start,num) 0xEE,flags,(f<<7)|((start&7)<<4)|)num&15)
  83. #define WS_FLDCLEAR(fld)      0xF0,fld
  84. #define WS_FLDCHAR(fld,char)  0xF1,fld,char
  85. #define WS_FLDATTR(fld,color) 0xF2,fld,color
  86. #define WS_FLDCURS(fld)       0xF4,fld
  87. #define WS_FLDRESET           0xFE
  88.  
  89. /*==========================================*/
  90.  
  91. #define QS_CURSROW            0xA0,0
  92. #define QS_CURSCOL            0xA1,0
  93. #define QS_SCRLROW            0xA2,0
  94. #define QS_SCRLCOL            0xA3,0
  95. #define QS_WINROW             0xA4,0
  96. #define QS_WINCOL             0xA5,0
  97. #define QS_WINROWS            0xA6,0
  98. #define QS_WINCOLS            0xA7,0
  99. #define QS_VIEWROW            0xA8,0
  100. #define QS_VIEWCOL            0xA9,0
  101. #define QS_LSIZEROWS          0xAA,0
  102. #define QS_LSIZECOLS          0xAB,0
  103. #define QS_CURSPOS            0xC0,0,0
  104. #define QS_SCRLORIG           0xC1,0,0
  105. #define QS_WINPOS             0xC2,0,0
  106. #define QS_WINSIZE            0xC3,0,0
  107. #define QS_VIEWPORT           0xC4,0,0
  108. #define QS_LOGSIZE            0xC5,0,0
  109. #define QS_HIDDEN             0xD5
  110. #define QS_FRAME              0xD6
  111. #define QS_READATTR           0xD9
  112. #define QS_LOGATTR            0xDA
  113. #define QS_CTRLCHAR           0xDC
  114. #define QS_LEAVEATTR          0xDF
  115. #define QS_COLOR              0xE2,0
  116.  
  117. /*==========================================*/
  118. /* OR in these when building manager stream */
  119. /* which uses the immediately following     */
  120. /* manifest constants                       */
  121. /* *don't* OR in when calling TVwin_allow,  */
  122. /* TVwin_disallow, TVwin_notify, or         */
  123. /* TVwin_cancel                             */
  124. /*==========================================*/
  125.  
  126. #define MS_ALLOW            0x00
  127. #define MS_DISALLOW         0x20
  128. #define MS_NOTIFY           0x40
  129. #define MS_NONOTIFY         0x60
  130.  
  131. #define TV_HMOVE            0x00 /* origin of window moves l/r */
  132. #define TV_VMOVE            0x01 /* origin of window moves u/d */
  133. #define TV_HSIZE            0x02 /* window width changes */
  134. #define TV_VSIZE            0x03 /* window height changes */
  135. #define TV_HSCROLL          0x04 /* window scrolled l/r */
  136. #define TV_VSCROLL          0x05 /* window scrolled u/d */
  137. #define TV_CLOSE            0x06 /* "Close" menu option */
  138. #define TV_HIDE             0x07 /* window hidden */
  139. #define TV_MARK             0x08 /* "Mark" menu, allow/disallow only */
  140. #define TV_HELP             0x08 /* "?" main menu selection, notify/cancel only */
  141. #define TV_COLORS           0x09 /* "Rearrange" "Colors"???  notify/cancel only */
  142. #define TV_SWITCHEDTO       0x0A /* switched from another window to this one, notify/cancel only */
  143. #define TV_SWITCHEDAWAY     0x0B /* switched to another window, notify/cancel only */
  144. #define TV_VIDEOMODE        0x0C /* changing video mode, notify/cancel only */
  145. #define TV_SCISSORS_CUT     0x0D /* selected "Scissors" "Cut", notify/cancel only */
  146. #define TV_SCISSORS_COPY    0x0E /* selected "Scissors" "Copy" */
  147. #define TV_SCISSORS         0x0E /* allow/disallow "Scissors" menu */
  148. #define TV_SCISSORS_PASTE   0x0F /* "Scissors" "Paste" selected, notify/cancel only */
  149. #define TV_MAINMENU         0x10 /* DV menu popped up */
  150. #define TV_SWITCH           0x11 /* "Switch" menu, allow/disallow only */
  151. #define TV_MENU_END         0x11 /* DV menu popped down, notify/cancel only */
  152. #define TV_OPENMENU         0x12 /* "Open" menu, allow/disallow only */
  153. #define TV_QUIT             0x13 /* "Quit" selection, allow/disallow only */
  154.  
  155. /*==========================================*/
  156.  
  157. #define MS_ATTACH             0x84
  158. #define MS_DETACH             0x85
  159. #define MS_FOREONLY           0x86
  160. #define MS_NOFOREONLY         0x87
  161. #define MS_MINSIZE(rows,cols) 0x88,rows,cols
  162. #define MS_MAXSIZE(rows,cols) 0x89,rows,cols
  163. #define MS_PRIM_ASYNC         0x8A /* plus DWORD pointer */
  164. #define MS_SEC_ASYNC          0x8B /* plus DWORD pointer */
  165.  
  166. #define MS_FLDMARKER(ch)      0xAF,ch
  167.  
  168. #define MS_WINTOPSYS          0xC0
  169. #define MS_GOFORE             0xC1
  170. #define MS_WINTOP             0xC2
  171. #define MS_CURRFLDPOS         0xC3
  172. #define MS_FLDPOS             0xC4
  173. #define MS_HIDECURR           0xC5
  174. #define MS_WINSHOW            0xC6
  175. #define MS_HIDE               0xC7
  176. #define MS_SUSPEND            0xC8
  177. #define MS_GOBACK             0xC9
  178. #define MS_WINBOTTOM          0xCA
  179. /* #define MS_???                0xCB */
  180. #define MS_FREETASK           0xCC
  181. #define MS_REORDER            0xCE
  182.